package com.ricky03;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;

@EnableAutoConfiguration
@ComponentScan
public class SpringBootStart04 {
    public static void main(String[] args) {
        SpringApplication app=new SpringApplication(SpringBootStart04.class);
        ConfigurableApplicationContext context = app.run(args);
//        System.out.println(context.getBean("createRunnableByCore"));
        context.getBean(Runnable.class).run();
        context.close();
    }
}
